#!/bin/bash

ARGV=$1

function cmdHelp()
{
    echo "help                      : display help."
    echo "1                         : select baba-fly rtl8188eu."
    echo "2                         : select baba-fly rtl8188fu."
}

function cmdSelectBabaFly_RTL8188EU()
{
    ln -s $PWD/configs/make_baba-fly-rtl8188eu.bash $PWD/.make.bash
}

function cmdSelectBabaFly_RTL8188FU()
{
    ln -s $PWD/configs/make_baba-fly-rtl8188fu.bash $PWD/.make.bash
}

if [ ! -f .make.bash ]; then
    case $ARGV in
        "help")
            cmdHelp
        ;;

        "1")
            cmdSelectBabaFly_RTL8188EU
        ;;

        "2")
            cmdSelectBabaFly_RTL8188FU
        ;;

        *)
            cmdHelp
        ;;
    esac
else
    . .make.bash
    case $ARGV in
        "clean")
            cmdCpuClean
            rm -rf source/buildroot/buildroot-2024.08
            rm -rf .make.bash
        ;;

        *)
            cmdCpu $ARGV
        ;;
    esac
fi


